Component({

  /** 
   * 组件的属性列表 
   */
  onChange(event) {
    console.log(event);

    this.setData({
      checked: event.detail,
    });
  },


  lifetimes: {
    ready() {
      
      this.setData({
        ops: JSON.parse(this.properties.ExamList.options)
      })
      console.log();
      
    }
  },



  onChange(e) {
    console.log(e);
  },
  properties: {
    ExamList: { // 属性名  
      type: Object,
      value: {}
    },
    index: {
      type: Number,
      value: 1
    }


  },
  /** 
   * 组件的初始数据 
   */
  data: {
    toastShow: false,
    ops: [],
    checked: [],
    isBtn: true,
    show: false,
    pageSize:50
  },
  /** 
   * 组件的方法列表 
   */
  methods: {
    showToast(text, time) {
      this.setData({
        toastShow: !this.data.toastShow,
        toastText: text
      })

      var that = this

      if (!time) {
        time = 8000
      }

      setTimeout(function () {
        that.setData({
          toastShow: !that.data.toastShow
        })
      }, time)
    },
    upOps() {
      if (this.data.index == 0) {
        return
      }
      this.triggerEvent('upindex')
      this.setData({
        ops: JSON.parse(this.properties.ExamList.options)
      })
    },

    showPopup() {
      this.setData({ show: true });
    },
  
    onClose() {
      this.setData({ show: false });
    },

    botOps() {
      this.triggerEvent('botindex')
      this.setData({
        ops: JSON.parse(this.properties.ExamList.options),
        isBtn:false
      })
    },
  }
})